using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;

public class TitleSceneUIHandle : MonoBehaviour
{
    [SerializeField]
    private HowToPlay howToPlayCanvas;
    [SerializeField]
    private SettingsDialog settingsCanvas;

    void Start()
    {
        DataManager.Instance.LoadSettings();
    }

    public void StartGame()
    {
        SceneManager.LoadScene(1);
    }    

    public void OpenHowToPlay()
    {
        HowToPlay newHowToPlay = Instantiate(howToPlayCanvas);
        newHowToPlay.Open();
    }

    public void OpenSettings()
    {
        SettingsDialog newSettings = Instantiate(settingsCanvas);
        newSettings.Open();
    }

    public void Quit()
    {
#if UNITY_EDITOR
       EditorApplication.isPlaying = false;
#else
    Application.Quit();
#endif
    }
    // Update is called once per frame
    void Update() 
    {
        
    }
}
